package com.atguigu.gmall.common.retryer;

import feign.RetryableException;
import feign.Retryer;

public class Retryer3 implements Retryer {

    int count = 3;
    int num = 1;
    @Override
    public void continueOrPropagate(RetryableException e) {

        if (num <= count){
            num++;
        }else {
            throw e;
        }
    }

    @Override
    public Retryer clone() {
        return new Retryer3();
    }
}
